/*
 * GenericDBFile.h
 *
 *  Created on: Mar 2, 2011
 *      Author: mayank
 */

#ifndef GENERICDBFILE_H_
#define GENERICDBFILE_H_

#include "TwoWayList.h"
#include "Record.h"
#include "Schema.h"
#include "File.h"
#include "Comparison.h"
#include "ComparisonEngine.h"
#include "BigQ.h"
//#include "DBFile.h"

#ifndef FTYPE_
#define FTYPE_
typedef enum {heap, sorted, tree} fType;
#endif
class GenericDBFile{

public:
	GenericDBFile();
	virtual ~GenericDBFile();
	virtual int Create (char *fpath);
	virtual int Open (char *fpath);
	virtual int Close ();

	virtual void Load (Schema &myschema, char *loadpath);

	virtual void MoveFirst ();
	virtual void Add (Record &addme);
	virtual int GetNext (Record &fetchme);
	virtual int GetNext (Record &fetchme, CNF &cnf, Record &literal);

};

#endif /* GENERICDBFILE_H_ */
